package 封装;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2022-06-24
 * Time: 22:47
 */
public class Data1 {
    //创建一个类，成员变量都用private修饰实现封装
    private int year;
    private int month;
    private int day;

    //这些方法就是公开的接口
    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }
}
